package org.farec.tcc.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class RelatorioDAO {
	
	private Connection connection;
	
	public RelatorioDAO(Connection connection)
	{
		this.connection=connection;
	}
	
	public ResultSet getRelArea()
	{
		try
		{
			String sql = "SELECT * from area";
			PreparedStatement stmt = this.connection.prepareStatement(sql);
			ResultSet rs = stmt.executeQuery();
			
			while(rs.next())
			{
				return rs;
			}
		
			return null;
		}
		catch(SQLException e)
		{
			throw new RuntimeException(e);
		}
	}

}
